#ifndef __WN_FS_H__
#define __WN_FS_H__

//fs_file结构体
struct fs_file {
  const char *data;   	      //数据
  int len;  			      //长度
  int index; 			      //索引号
};

struct fsdata_file {
  const struct fsdata_file *next; //指向一个fsdata_file文件
  const unsigned char *name;      //名字
  const unsigned char *data;      //数据
  int len; 					      //长度
};

#define file_NULL (struct fsdata_file *) 0

struct fs_file *fs_open(const char *name);
void fs_close(struct fs_file *file);
int fs_read(struct fs_file *file, char *buffer, int count);
int fs_bytes_left(struct fs_file *file);
int fs_check(const char *name);

#endif /* __FS_H__ */
